import Vue from 'vue'
import Router from 'vue-router'

const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../views/login/login')
    }, {
      path: '/rainbow',
      name: 'rainbow',
      component: () => import('../components/rainbow/rainbow')
    }, {
      path: '/home',
      name: 'home',
      meta: {title: '首页'},
      component: () => import('../views/home/home'),
    }, {
      path: '/myFans',
      name: 'myFans',
      meta: {title: '归属风机'},
      component: () => import('../views/myFans/myFans')
    },

    {
      path: '/yjyqFans',
      name: 'yjyqFans',
      meta: {title: '已预期风机'},
      component: () => import('../views/yjyqFans/yjyqFans')
    }, {
      path: '/jjyqFans',
      name: 'jjyqFans',
      meta: {title: '即将预期风机'},
      component: () => import('../views/jjyqFans/jjyqFans')
    },

  ],

})
